Trilium supports Mermaid, which adds support for various diagrams such
as flowchart, sequence diagram, class diagram, state diagram, pie charts,
etc., all using a text description of the chart instead of manually drawing
the diagram.
The source/preview can be laid out left-right or bottom-top via the Move editing pane to the left / bottom option.
Press Lock editing to automatically mark the note as read-only.
In this mode, the code pane is hidden and the diagram is displayed full-size.
Similarly, press Unlock editing to mark a read-only note as editable.
Press the Copy image reference to the clipboard to be able to insert
the image representation of the diagram into a text note. See Image references for more information.
Press the Export diagram as SVG to download a scalable/vector rendering
of the diagram. Can be used to present the diagram without degrading when
zooming.
Press the Export diagram as PNG to download a normal image (at
1x scale, raster) of the diagram. Can be used to send the diagram in more
traditional channels such as e-mail.
Errors in the diagram
If there is an error in the source code, the error will be displayed in
an information pane.
During the state of an error, the diagram will no longer be rendered and
the previously working diagram will remain in the preview section.